public class Main {
    public static void main(String[] args) throws Exception {

        WaterHeaterStateMachine machine = new WaterHeaterStateMachine();

        for (int i = 0; i < 20; i++) {

            if (i == 3) machine.setTemperature(15);
            if (i == 6) machine.setTemperature(100);
            if (i == 10) machine.setHour(23);
            if (i == 15) machine.setHour(7);

            machine.update();
            machine.printStatus();

            Thread.sleep(500);
            System.out.println("-------------------------------");
        }
    }
}
